var express = require('express');
var router = express.Router();

const {
  findByUserId,
  insert,
  update,
  delById
} = require("../controller/cart");
const { authFilter } = require("../middlewares/auth");

class UsersRouter {
  static initRouter() {

    router.get('/:userid', authFilter, findByUserId);
    router.post('/0', authFilter, insert);
    router.put('/:id', authFilter, update);
    router.delete('/:userid', authFilter, delById);

    return router;
  }
}
module.exports = UsersRouter.initRouter();